/********************************************************************
  Copyright by PCI, 2002-10-08
  File Name: db_ppm_tariff.cxx
  Created Date: 2002-10-08 
  Author: Machine
  Version: 1.0 
  Last Version Date: 
  Version Date:
*******************************************************************/
/********************************************************************
  Copyright by PCI, 2002-10-08
  Class Name: CTable_PPM_TARIFF
  Created Date: 2002-10-08 
  Author: Machine
  Defined File: db_ppm_tariff.hxx
  Last Version Date: 
  Version Date:
*******************************************************************/
#include "table_ppm.h"

CTable_PPM_TARIFF::CTable_PPM_TARIFF( )
 :NPCRecordSet( )
{
  setTableName( "PPM_TARIFF" );
  prepareTable();
  prepareQuery();
 
  ID.setField( "ID", DATA_DOUBLE, 22, 1 );
  makeTableItem( ID );
  makeKeyItem( ID ); 
  PRICING_SECTION_CD.setField( "PRICING_SECTION_CD", DATA_DOUBLE, 22, 0 );
  makeTableItem( PRICING_SECTION_CD );
  TARIFF_ID.setField( "TARIFF_ID", DATA_DOUBLE, 22, 0 );
  makeTableItem( TARIFF_ID );
  TARIFF_TYPE.setField( "TARIFF_TYPE", DATA_CHAR, 3, 0 );
  makeTableItem( TARIFF_TYPE );
  RESOURCE_ID.setField( "RESOURCE_ID", DATA_DOUBLE, 22, 0 );
  makeTableItem( RESOURCE_ID );
  ACTION_ID.setField( "ACTION_ID", DATA_DOUBLE, 22, 0 );
  makeTableItem( ACTION_ID );
  ACCTITEM_TYPE_ID.setField( "ACCTITEM_TYPE_ID", DATA_DOUBLE, 22, 0 );
  makeTableItem( ACCTITEM_TYPE_ID );
  SUB_PRODUCT_ID.setField( "SUB_PRODUCT_ID", DATA_DOUBLE, 22, 0 );
  makeTableItem( SUB_PRODUCT_ID );
  TARIFF_UNIT_ID.setField( "TARIFF_UNIT_ID", DATA_DOUBLE, 22, 0 );
  makeTableItem( TARIFF_UNIT_ID );
  CALC_METHOD_ID.setField( "CALC_METHOD_ID", DATA_DOUBLE, 22, 0 );
  makeTableItem( CALC_METHOD_ID );
  RATE_UNIT.setField( "RATE_UNIT", DATA_DOUBLE, 22, 0 );
  makeTableItem( RATE_UNIT );
  FIXED_RATE_VALUE_ID.setField( "FIXED_RATE_VALUE_ID", DATA_DOUBLE, 22, 0 );
  makeTableItem( FIXED_RATE_VALUE_ID );
  SCALED_RATE_VALUE_ID.setField( "SCALED_RATE_VALUE_ID", DATA_DOUBLE, 22, 0 );
  makeTableItem( SCALED_RATE_VALUE_ID );
  CALC_PRIORITY.setField( "CALC_PRIORITY", DATA_DOUBLE, 22, 0 );
  makeTableItem( CALC_PRIORITY );
  BELONG_CYCLE_DURATION.setField( "BELONG_CYCLE_DURATION", DATA_DOUBLE, 22, 0 );
  makeTableItem( BELONG_CYCLE_DURATION );
  CHARGE_PARTY_ID.setField( "CHARGE_PARTY_ID", DATA_CHAR, 3, 0 );
  makeTableItem( CHARGE_PARTY_ID );
  RESOURCE_OWNER_TYPE.setField( "RESOURCE_OWNER_TYPE", DATA_CHAR, 3, 0 );
  makeTableItem( RESOURCE_OWNER_TYPE );
}


CTable_PPM_TARIFF::CTable_PPM_TARIFF( NPConnection& pcldb )
 :NPCRecordSet( pcldb )
{
  setTableName( "PPM_TARIFF" );
  prepareTable();
  prepareQuery();
 
  ID.setField( "ID", DATA_DOUBLE, 22, 1 );
  makeTableItem( ID );
  makeKeyItem( ID ); 
  PRICING_SECTION_CD.setField( "PRICING_SECTION_CD", DATA_DOUBLE, 22, 0 );
  makeTableItem( PRICING_SECTION_CD );
  TARIFF_ID.setField( "TARIFF_ID", DATA_DOUBLE, 22, 0 );
  makeTableItem( TARIFF_ID );
  TARIFF_TYPE.setField( "TARIFF_TYPE", DATA_CHAR, 3, 0 );
  makeTableItem( TARIFF_TYPE );
  RESOURCE_ID.setField( "RESOURCE_ID", DATA_DOUBLE, 22, 0 );
  makeTableItem( RESOURCE_ID );
  ACTION_ID.setField( "ACTION_ID", DATA_DOUBLE, 22, 0 );
  makeTableItem( ACTION_ID );
  ACCTITEM_TYPE_ID.setField( "ACCTITEM_TYPE_ID", DATA_DOUBLE, 22, 0 );
  makeTableItem( ACCTITEM_TYPE_ID );
  SUB_PRODUCT_ID.setField( "SUB_PRODUCT_ID", DATA_DOUBLE, 22, 0 );
  makeTableItem( SUB_PRODUCT_ID );
  TARIFF_UNIT_ID.setField( "TARIFF_UNIT_ID", DATA_DOUBLE, 22, 0 );
  makeTableItem( TARIFF_UNIT_ID );
  CALC_METHOD_ID.setField( "CALC_METHOD_ID", DATA_DOUBLE, 22, 0 );
  makeTableItem( CALC_METHOD_ID );
  RATE_UNIT.setField( "RATE_UNIT", DATA_DOUBLE, 22, 0 );
  makeTableItem( RATE_UNIT );
  FIXED_RATE_VALUE_ID.setField( "FIXED_RATE_VALUE_ID", DATA_DOUBLE, 22, 0 );
  makeTableItem( FIXED_RATE_VALUE_ID );
  SCALED_RATE_VALUE_ID.setField( "SCALED_RATE_VALUE_ID", DATA_DOUBLE, 22, 0 );
  makeTableItem( SCALED_RATE_VALUE_ID );
  CALC_PRIORITY.setField( "CALC_PRIORITY", DATA_DOUBLE, 22, 0 );
  makeTableItem( CALC_PRIORITY );
  BELONG_CYCLE_DURATION.setField( "BELONG_CYCLE_DURATION", DATA_DOUBLE, 22, 0 );
  makeTableItem( BELONG_CYCLE_DURATION );
  CHARGE_PARTY_ID.setField( "CHARGE_PARTY_ID", DATA_CHAR, 3, 0 );
  makeTableItem( CHARGE_PARTY_ID );
  RESOURCE_OWNER_TYPE.setField( "RESOURCE_OWNER_TYPE", DATA_CHAR, 3, 0 );
  makeTableItem( RESOURCE_OWNER_TYPE );
}

CTable_PPM_TARIFF::~CTable_PPM_TARIFF( )
{
    close();
}

